name_filter :svn_hook do |names, configurations, options|
  repository = options[:repository].chomp("/")
  revision = options[:revision]
  svn_bin = options[:svn_bin] || "svn"

  svn_log_command = "'#{svn_bin}' log '#{repository}' -v -r '#{revision}' 2>&1"
  output = syscmd_output(svn_log_command)

  paths = []
  output.each_line do |line|
    if (line =~ /Changed paths:/)...(line =~ /^$/)
      paths << "#{repository}#{$&}" if line =~ %r(/.*$)
    end
  end     
  
  names.delete_if do |name|
    config = configurations[name]
    next true unless config.exists?(:scm) && config.scm.type == :subversion

    not paths.find do |path|
      path =~ /^#{Regexp.escape config.repository}([^[:alnum:]]|$)/
    end
  end
  names  
end
